<template>
	<div class="modal" v-if="isShow">
		<div class="main">
      <!-- <p class="tltle">{{text.type}}</p> -->
			<p class="msg">{{text.msg}}</p>
			<!-- <div class="btnBox">
				<span @click="close">{{text.btn.no}}</span>
				<span @click="ok">{{text.btn.ok}}</span>
			</div> -->
		</div>
	</div>
</template>

<script>
export default {
    data(){
        return{
            isShow:true,
            text:{
                type:'提示',
                msg:'',
                time:'',
                btn:{
                    ok:'确定',
                    no:'取消'
                },
            }
        }
    },
    beforeUpdate :function(){
      var that = this;
      var t = this.text.time*1000;
     setTimeout(function(){
       that.isShow=false;
     },t)
    },
    methods:{
        close(){
            setTimeout(function(){
              this.isShow=false;
            },2000)
        },
        ok(){
            this.isShow=false;
        },
    },
    created() {

    }
}
</script>

<style scoped>
.modal{
		position: fixed;
		width:300px;
		height:auto;
		top:40%;
		left:50%;
    margin-left: -150px;
		z-index:99999999;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border: 1px solid #FFA22A ; */
	}
  .tltle{
    width: 100%;
    height: 46px;
    line-height: 46px;
    font-size: 18px;
    background-color: #242A35;
    text-align: center;
    color: #FFA22A;
  }
	.main{
		color:#FFFFFF;
    background-color: #666;
    border-radius:3px;
	}
	.msg{
    font-size: 16px;
    padding: 20px 40px;
    text-align: center;
	}
	.btnBox{
		display: flex;
		justify-content: space-between;
		margin-top:0.88rem;
	}
	.btnBox span{
		display: inline-block;
		width:1.51rem;
		height:0.62rem;
		line-height: 0.62rem;
		/* background: url(xxx.png)no-repeat left center; */
		background-size:100% 100%;
		font-weight:500;
	    color:rgba(48,197,171,1);
	    font-size:0.33rem;
	}
	.btnBox span:last-child{
		/* background: url(xxx.png)no-repeat left center; */
		background-size:100% 100%;
		color:rgba(212,255,249,1);
	}
</style>
